<!-- 导航URL -->
<div class="row wrapper border-bottom white-bg page-heading">
  <div class="col-md-12">
    <ol class="breadcrumb">
      <li><a href="index.jsp">主页</a></li>
      <li>管理中心</li>
      <li class="active"><strong>公众号推送信息</strong></li>
    </ol>
  </div>
</div>
<!-- 主要内容 -->
<div class="wrapper wrapper-content animated fadeIn"
     ng-controller="wechatPublicDetailCtrl">
  <div class="row">
    <div class="col-lg-12">
      <div class="ibox float-e-margins">
        <div class="ibox-title">
          <h5>公众号推送信息</h5>
        </div>
        <div class="ibox-content">
          <form class="form-horizontal" id="form1" name="horizontal">
            <div class="row">
              <div class="col-lg-12">
                <div class="panel-body ibox float-e-margins">
                  <div class="ibox-content">
                    <div class="form-group">
                      <label class="col-sm-2 control-label">公众号：</label>
                      <div class="col-sm-4">
                        <input type="text" class="form-control" disabled ng-model='detailInfo.pubName'/>
                      </div>
                    </div>
                    <div class="form-group">
                      <label class="col-sm-2 control-label">模板标题：</label>
                      <div class="col-sm-4">
                        <input type="text" class="form-control" disabled ng-model='detailInfo.title'/>
                      </div>
                    </div>
                    <div class="form-group">
                      <label class="col-sm-2 control-label"><i class="red_req">*</i>下发对象：</label>
                      <div class="col-sm-4">
                        <select class="form-control" required name="userType" ng-model="batchInfo.userType"
                                ng-options="x.value as x.text for x in userType"/>
                      </div>
                      <div class="req_mesg" ng-show="horizontal.userType.$dirty && horizontal.userType.$invalid">
                        <span ng-show="horizontal.userType.$error.required">下发对象不能为空</span>
                      </div>
                    </div>
                    <div class="form-group" ng-if="batchInfo.userType=='CUSTOM'">
                      <label class="col-sm-2 control-label">导入文件：</label>
                      <div class="col-sm-3 checkbox ">
                        <input type="file" nv-file-select="" ng-model="fileSelect" uploader="uploader" multiple/>
                        <i class="red_req">注意：导入文件支持最高5万条</i>
                        <table class="table">
                          <tbody>
                          <tr ng-repeat="item in uploader.queue">
                            <td>
                              <strong>{{ item.file.name }}</strong>
                            </td>
                            <td nowrap>
                              <button type="button" class="btn btn-danger btn-xs" ng-click="item.remove()">
                                <span class="glyphicon glyphicon-trash"></span>删除
                              </button>
                            </td>
                          </tr>
                          </tbody>
                        </table>
                      </div>
                      <label class="col-sm-2 control-label"></label>
                      <div class="col-sm-3 checkbox ">
                        <a href="publicAccountMsgTemp/downloadTemplate">导入文件模板</a>
                      </div>
                    </div>

                    <div class="form-group">
                      <label class="col-sm-2 control-label">详细内容</label>
                    </div>
                    <div class="form-group">
                      <label class="col-sm-2 control-label"><i class="red_req">*</i>内容：</label>
                      <div class="col-sm-4">
                        <input type="text" class="form-control" required name="msgContent"
                               ng-model='batchInfo.msgContent'/>
                      </div>
                      <div class="req_mesg" ng-show="horizontal.msgContent.$dirty && horizontal.msgContent.$invalid">
                        <span ng-show="horizontal.msgContent.$error.required">内容不能为空</span>
                      </div>
                    </div>
                    <div class="form-group">
                      <label class="col-sm-2 control-label"><i class="red_req">*</i>自定义链接：</label>
                      <div class="col-sm-4">
                        <input type="text" class="form-control" required name="msgUrl" ng-model='batchInfo.msgUrl'/>
                      </div>
                      <div class="req_mesg" ng-show="horizontal.msgUrl.$dirty && horizontal.msgUrl.$invalid">
                        <span ng-show="horizontal.msgUrl.$error.required">自定义链接不能为空</span>
                      </div>
                    </div>
                    <div class="form-group">
                      <label class="col-sm-2 control-label">备注文字：</label>
                      <div class="col-sm-4">
                        <input type="text" class="form-control" name="msgRemark" ng-model='batchInfo.msgRemark'/>
                      </div>
                    </div>
                    <div class="form-group">
                      <label class="col-sm-2 control-label"><i class="red_req">*</i>发送时间段：</label>
                      <div class="col-sm-8">
                        <input id="d5227" class="form-control" type="datetime" datepicker required name="effectiveStartTime" ng-model="batchInfo.effectiveStartTime" onchange=""  style="width:auto;display:inline-block;"
                               onFocus="var d5228=$dp.$('d5228');WdatePicker({skin:'whyGreen',dateFmt: 'HH:mm:ss',onpicked:function(){d5228.focus();},maxDate:'#F{$dp.$D(\'d5228\')}'})"/>
                        ~
                        <input id="d5228" class="form-control" type="datetime" datepicker required name="effectiveEndTime"  ng-model="batchInfo.effectiveEndTime" onchange=""  style="width:auto;display:inline-block;"
                               onFocus="WdatePicker({skin:'whyGreen',dateFmt: 'HH:mm:ss',minDate:'#F{$dp.$D(\'d5227\')}'})"/>
                        <div class="req_mesg" ng-show="horizontal.effectiveStartTime.$dirty && horizontal.effectiveStartTime.$invalid">
                          <span ng-show="horizontal.effectiveStartTime.$error.required">开始时间不能为空</span>
                        </div>
                        <div class="req_mesg" ng-show="horizontal.effectiveEndTime.$dirty && horizontal.effectiveEndTime.$invalid">
                          <span ng-show="horizontal.effectiveEndTime.$error.required">结束时间不能为空</span>
                        </div>
                      </div>
                    </div>

                    <div class="form-group">
                      <label class="col-sm-2 control-label"></label>
                      <div class="col-sm-6">
                        <button class="btn btn-primary btn-mr20" ng-disabled="horizontal.$invalid || submitting"
                                type="button" ng-click='submit()' ng-show="hasPermit('publicAccountMsgTemp.pubSend')"
                                id="btnSubmitImg">确定
                        </button>
                        <button class="btn btn-primary8" type="button" ui-sref="sys.wechatPublic">取消</button>
                      </div>
                    </div>
                    <div ng-show="loadImg" class="timg"></div>
                    <div class="coverbg" id="coverbg" >
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </form>


          <form class="form-horizontal" id="transferForm" name="importHorizontal" novalidate style="z-index: 1">
            <div id="importModal" class="modal fade" tabindex="-2" role="dialog">
              <div class="modal-dialog" style="width: 900px">
                <div class="modal-content">
                  <div class="modal-header">
                    <h3 class="modal-title">导入结果</h3>
                  </div>
                  <div class="modal-body">
                    <div class="form-group">
                      <div class="col-sm-4">
                        {{importResult}}
                      </div>
                    </div>
                    <div class="form-group">
                      <label class="col-sm-2 control-label"></label>
                      <div class="col-sm-6">
                        <button class="btn btn-primary btn-mr20" type="button" ng-click='showPreSendModal()' ng-show="hasPermit('publicAccountMsgTemp.pubSend')"
                                id="btnSubmitImg1">继续发送
                        </button>
                        <button class="btn btn-primary8" type="button" ng-click='hideImportModal()'>取消</button>
                      </div>
                    </div>

                  </div>
                </div>
              </div>
            </div>
          </form>

          <form class="form-horizontal" id="preSendForm" name="preSendHorizontal" novalidate style="z-index: 888">
            <div id="preSendModal" class="modal fade" tabindex="3" role="dialog">
              <div class="modal-dialog" style="width: 900px">
                <div class="modal-content">
                  <div class="modal-header">
                    <h3 class="modal-title">推送信息</h3>
                  </div>
                  <div class="modal-body">
                    <div class="form-group">
                      <label class="col-sm-2 control-label">模板ID：</label>
                      <div class="col-sm-4 checkbox" ng-bind="perSendInfo.msgTempId">
                      </div>
                    </div>
                    <div class="form-group">
                      <label class="col-sm-2 control-label">标题：</label>
                      <div class="col-sm-4 checkbox" ng-bind="perSendInfo.title">
                      </div>
                    </div>
                    <div class="form-group">
                      <label class="col-sm-2 control-label"></label>
                      <div class="col-sm-4 checkbox" ng-bind="perSendInfo.msgContent">
                      </div>
                    </div>
                    <div class="form-group">
                      <label class="col-sm-2 control-label">绑定状态：</label>
                      <div class="col-sm-4 checkbox" ng-bind="perSendInfo.bindStatus">
                      </div>
                    </div>
                    <div class="form-group">
                      <label class="col-sm-2 control-label">时间：</label>
                      <div class="col-sm-4 checkbox" ng-bind="perSendInfo.pushTimeStr">
                      </div>
                    </div>
                    <div class="form-group">
                      <label class="col-sm-2 control-label">自定义链接：</label>
                      <div class="col-sm-4 checkbox" ng-bind="perSendInfo.msgUrl">
                      </div>
                    </div>
                    <div class="form-group">
                      <label class="col-sm-2 control-label">发送对象：</label>
                      <div class="col-sm-4 checkbox" ng-bind="perSendInfo.userTypeName">
                      </div>
                    </div>
                    <div class="form-group" ng-if="perSendInfo.userCount">
                      <label class="col-sm-2 control-label">人数：</label>
                      <div class="col-sm-4 checkbox" ng-bind="perSendInfo.userCount+'人'">
                      </div>
                    </div>
                    <div class="form-group">
                      <label class="col-sm-2 control-label"></label>
                      <div class="col-sm-6">
                        <button class="btn btn-primary btn-mr20" ng-disabled="transferHorizontal.$invalid || submitting"
                                type="button" ng-click='send()' ng-show="hasPermit('publicAccountMsgTemp.pubSend')"
                                id="btnSubmitImg2">确定发送
                        </button>
                        <button class="btn btn-primary8" type="button" ng-click='hidePreSendModal()'>取消</button>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </form>
        </div>
      </div>
    </div>
  </div>
  <div style="height: 30px;"></div>

</div>
<style>
  .coverbg{
    position: fixed;
    left: 0;
    top:0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    width: 100%;
    height: 100%;
    display: none;
  }


</style>